#!/bin/bash
###
 # @Date: 2020-11-30 15:12:48
 # @LastEditors: Tonser
 # @LastEditTime: 2020-11-30 15:20:54
 # @FilePath: /SwarmScripts/start_tmux.sh
 # @Description: 描述本程序内容......
### 
tmux new-session -d -s a  #;  # 后台新建一个session
tmux split-window -h   # 切割窗口
tmux select-pane -t 0  ## 选择0号窗口
tmux send-keys "cd " C-m   #向选择的窗口发送指令
tmux send-keys "./SwarmScripts/start_roslaunch_base.sh" C-m   #向选择的窗口发送指令
# tmux split-window -v    #多次切割后每个小窗口的编号会变化
tmux select-pane -t 1
# tmux send-keys "command" C-m
tmux send-keys "sleep 10" C-m
# sleep 10
tmux send-keys "cd " C-m
tmux send-keys "./SwarmScripts/start_roslaunch_control.sh" C-m
# tmux select-pane -t 2
# tmux send-keys "mysql -uroot -p123456 --host 192.168.1.221 --sigint-ignore --auto-vertical-output" C-m
# tmux send-keys "use data" C-m
# tmux -2 attach-session -t ssh  #挂载到之前运行的session上


exit 0
